using CsGL.Util;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
using System.Windows.Forms;

namespace TagTool.OpenGL
{

	public sealed class AppForm : Form 
	{
		private bool isDisposed = false;												// Has Dispose Been Called?
		App app;
		
		public AppForm(App app, String name) 
		{
			this.app = app;
			this.SuspendLayout();
			Name = name;
			this.Text = name;
			// view
			app.View.Dock = DockStyle.Fill;

			this.Controls.AddRange(new Control[] { app.View });

			this.Size = new Size(app.Width, app.Height);
			this.ResumeLayout();
			
		}

		protected override void Dispose(bool disposing) 
		{
			if(!isDisposed) 
			{															// Check To See If Dispose Has Already Been Called
				if(disposing) 
				{															// If disposing Equals true, Dispose All Managed And Unmanaged Resources
					GC.SuppressFinalize(this);											// Suppress Finalization
				}
				base.Dispose(disposing);
			}
		}

	}
}
